<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:core="http://www.contact.core.com/contacts/core/ui"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:common="http://www.contact.common.com/contacts/ui"
        >

<!--@elvariable id="id" type="java.lang.String"-->
<ui:component>
    <style type="text/css">
        table.noborder td {
            border: 0;
        }
    </style>
    <a4j:outputPanel id="#{id}schoolTablePanel">
        <rich:dataTable id="#{id}schoolTable"
                        style="background:inherit; border:none;" cellpadding="0"
                        value="#{eduWorkInformationSessionBean.allSchools}"
                        styleClass="noborder"
                        var="data">


            <rich:column>

                <h:panelGrid columns="2">
                    <h:outputLabel value="High School:"/>
                    <h:panelGrid cellpadding="0" cellspacing="0" columns="2">
                        <h:inputText value="#{data.schoolName}"/>
                        <rich:comboBox value="#{dateSessionBean.year}"
                                       enableManualInput="false"
                                       selectFirstOnUpdate="false"
                                       defaultLabel="#{resources.classYearLabel}"
                                       width="70px"
                                       style="margin-left:3px;">
                            <f:selectItems value="#{dateActionBean.years}"/>
                        </rich:comboBox>
                    </h:panelGrid>


                    <h:column/>
                    <a4j:commandLink id="rowSchool_#{data.index}"
                                     reRender="#{id}schoolTablePanel"
                                     action="#{eduWorkInformation.removeSchoolRow}"
                                     value="Remove High School">
                        <f:param name="commonIndex" value="#{data.index}"/>
                    </a4j:commandLink>
                </h:panelGrid>
            </rich:column>


        </rich:dataTable>
        <rich:separator rendered="#{eduWorkInformation.canAddNewSchoolRow}"
                        style="margin-top:5px;margin-bottom:5px" height="1px" width="400px"/>
        <a4j:commandLink rendered="#{eduWorkInformation.canAddNewSchoolRow}"
                         value="Add Another High School"
                         action="#{eduWorkInformation.addNewSchoolRow}"
                         reRender="#{id}schoolTablePanel"/>
    </a4j:outputPanel>

</ui:component>


</html>